package com.itheima.pattern.visitor.demo;

public class Animal {
}
class Dog extends Animal{

}
class Cat extends Animal{}

class Execute{
    public void execute(Animal a){
        System.out.println("动物");
    }
    public void execute(Dog d){
        System.out.println("狗");
    }
    public void execute(Cat c){
        System.out.println("猫");
    }
}

